<!DOCTYPE html>
<html lang="en">
<head>
    <#include "/WEB-INF/views/common/meta.html" />
    <#include "/WEB-INF/views/common/css.html"/>
</head>
<body>
<header class="mui-bar mui-bar-nav bg-blue">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">设置账户</h1>
</header>

<div class="mui-content">
    <form class="mui-input-group" id="dataForm">
        <div class="mui-input-row" style="margin-top:5px;">
            <label>姓名</label>
            <input type="text" name="nickName" class="mui-input-clear" placeholder="请输入" value="${currentUser.nickName}">
        </div>
        <div class="mui-input-row">
            <label>手机</label>
            <input type="text" name="mobile" class="mui-input-clear" placeholder="请输入" value="${currentUser.mobile}">
        </div>

        <div class="mui-button-row">
            <button type="button" class="mui-btn mui-btn-primary" onclick="commit()">确认</button>
        </div>
    </form>
</div>
</body>
<#include "/WEB-INF/views/common/js.html"/>
<script type="text/javascript">
    function commit(){
        var dataJson = $("#dataForm").serializeArray();
        $.post("/user/saveInfo",dataJson,function(result){
            if (result.success) {
                alert("保存成功！");
            } else {
                alert(result.message);
            }
        },"json");
    }
</script>
</html>